home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / CMICCProfile.mod < prev    next >
Encoding:
Text File  |  1995-08-10  |  23.7 KB  |  657 lines  |  [TEXT/MPS ]

  1. (*
  2.      File:        CMICCProfile.mod
  3.  
  4.      Contains:    Definitions for ColorSync 2.0 profile
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs.applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. *)
  19.  
  20. (*$IF UNDEFINED OLDROUTINENAMES*)
  21. (*$SET OLDROUTINENAMES FALSE*)
  22. (*$END*)
  23. (*$TAGS-*)
  24. (*$CALLING PASCAL*)
  25. MODULE CMICCProfile;
  26.  
  27. IMPORT SYSTEM, Types;
  28.  
  29. (* $PUSH*)
  30. (* $ALIGN MAC68K*)
  31. (* $LibExport+*)
  32.  
  33. CONST
  34.     cmCS2ProfileVersion*            = $02000000;
  35.  
  36. (* Current Major version number *)
  37.     cmCurrentProfileMajorVersion* = $02000000;
  38.  
  39. (* magic cookie number for anonymous file AIFF.ID *)
  40.     cmMagicNumber*                = LONG("acsp");
  41.  
  42. (* ColorSync profile version 1.0 *)
  43.     cmCS1ProfileVersion*            = $00000100;
  44.  
  45. (************************************************************************)
  46. (*************** ColorSync 2.0 profile specification ********************)
  47. (************************************************************************)
  48. (* profile flags element values *)
  49.     cmEmbeddedProfile*            = 0;                            (* 0 is not embedded profile, 1 is embedded profile *)
  50.     cmEmbeddedUse*                = 1;                            (* 0 is to use anywhere, 1 is to use as embedded profile only *)
  51.  
  52. (* data type element values *)
  53.     cmAsciiData*                    = 0;
  54.     cmBinaryData*                = 1;
  55.  
  56. (* rendering intent element values  *)
  57.     cmPerceptual*                = 0;                            (* Photographic images *)
  58.     cmRelativeColorimetric*        = 1;                            (* Logo Colors *)
  59.     cmSaturation*                = 2;                            (* Business graphics *)
  60.     cmAbsoluteColorimetric*        = 3;                            (* Logo Colors *)
  61.  
  62. (* speed and quality flag options *)
  63.     cmNormalMode*                = 0;                            (* it uses the least significent two bits in the high word of flag *)
  64.     cmDraftMode*                    = 1;                            (* it should be evaulated like this: right shift 16 bits first, mask off the *)
  65.     cmBestMode*                    = 2;                            (* high 14 bits, and then compare with the enum to determine the option value *)
  66.  
  67. (* device/media attributes element values  *)
  68.     cmReflective*                = 0;                            (* 0 is reflective media, 1 is transparency media *)
  69.     cmGlossy*                    = 1;                            (* 0 is glossy, 1 is matte *)
  70.  
  71. (* screen encodings  *)
  72.     cmPrtrDefaultScreens*        = 0;                            (* Use printer default screens.  0 is false, 1 is ture *)
  73.     cmLinesPer*                    = 1;                            (* 0 is LinesPerCm, 1 is LinesPerInch *)
  74.  
  75. (* 2.0 tag type information *)
  76.     cmNumHeaderElements*            = 10;
  77.  
  78. (* public tags *)
  79.     cmAToB0Tag*                    = LONG("A2B0");
  80.     cmAToB1Tag*                    = LONG("A2B1");
  81.     cmAToB2Tag*                    = LONG("A2B2");
  82.     cmBlueColorantTag*            = LONG("bXYZ");
  83.     cmBlueTRCTag*                = LONG("bTRC");
  84.     cmBToA0Tag*                    = LONG("B2A0");
  85.     cmBToA1Tag*                    = LONG("B2A1");
  86.     cmBToA2Tag*                    = LONG("B2A2");
  87.     cmCalibrationDateTimeTag*    = LONG("calt");
  88.     cmCharTargetTag*                = LONG("targ");
  89.     cmCopyrightTag*                = LONG("cprt");
  90.     cmDeviceMfgDescTag*            = LONG("dmnd");
  91.     cmDeviceModelDescTag*        = LONG("dmdd");
  92.     cmGamutTag*                    = LONG("gamt");
  93.     cmGrayTRCTag*                = LONG("kTRC");
  94.     cmGreenColorantTag*            = LONG("gXYZ");
  95.     cmGreenTRCTag*                = LONG("gTRC");
  96.     cmLuminanceTag*                = LONG("lumi");
  97.     cmMeasurementTag*            = LONG("meas");
  98.     cmMediaBlackPointTag*        = LONG("bkpt");
  99.     cmMediaWhitePointTag*        = LONG("wtpt");
  100.     cmNamedColorTag*                = LONG("ncol");
  101.     cmPreview0Tag*                = LONG("pre0");
  102.     cmPreview1Tag*                = LONG("pre1");
  103.     cmPreview2Tag*                = LONG("pre2");
  104.     cmProfileDescriptionTag*        = LONG("desc");
  105.     cmProfileSequenceDescTag*    = LONG("pseq");
  106.     cmPS2CRD0Tag*                = LONG("psd0");
  107.     cmPS2CRD1Tag*                = LONG("psd1");
  108.     cmPS2CRD2Tag*                = LONG("psd2");
  109.     cmPS2CRD3Tag*                = LONG("psd3");
  110.     cmPS2CSATag*                    = LONG("ps2s");
  111.     cmPS2RenderingIntentTag*        = LONG("ps2i");
  112.     cmRedColorantTag*            = LONG("rXYZ");
  113.     cmRedTRCTag*                    = LONG("rTRC");
  114.     cmScreeningDescTag*            = LONG("scrd");
  115.     cmScreeningTag*                = LONG("scrn");
  116.     cmTechnologyTag*                = LONG("tech");
  117.     cmUcrBgTag*                    = LONG("bfd ");
  118.     cmViewingConditionsDescTag*    = LONG("vued");
  119.     cmViewingConditionsTag*        = LONG("view");
  120.  
  121. (* custom tags *)
  122.     cmPS2CRDVMSizeTag*            = LONG("psvm");
  123.  
  124. (* technology tag descriptions *)
  125.     cmTechnologyFilmScanner*        = LONG("fscn");
  126.     cmTechnologyReflectiveScanner* = LONG("rscn");
  127.     cmTechnologyInkJetPrinter*    = LONG("ijet");
  128.     cmTechnologyThermalWaxPrinter* = LONG("twax");
  129.     cmTechnologyElectrophotographicPrinter* = LONG("epho");
  130.     cmTechnologyElectrostaticPrinter* = LONG("esta");
  131.     cmTechnologyDyeSublimationPrinter* = LONG("dsub");
  132.     cmTechnologyPhotographicPaperPrinter* = LONG("rpho");
  133.     cmTechnologyFilmWriter*        = LONG("fprn");
  134.     cmTechnologyVideoMonitor*    = LONG("vidm");
  135.     cmTechnologyVideoCamera*        = LONG("vidc");
  136.     cmTechnologyProjectionTelevision* = LONG("pjtv");
  137.     cmTechnologyCRTDisplay*        = LONG("CRT ");
  138.     cmTechnologyPMDisplay*        = LONG("PMD ");
  139.     cmTechnologyAMDisplay*        = LONG("AMD ");
  140.     cmTechnologyPhotoCD*            = LONG("KPCD");
  141.     cmTechnologyPhotoImageSetter* = LONG("imgs");
  142.     cmTechnologyGravure*            = LONG("grav");
  143.     cmTechnologyOffsetLithography* = LONG("offs");
  144.     cmTechnologySilkscreen*        = LONG("silk");
  145.     cmTechnologyFlexography*        = LONG("flex");
  146.  
  147. (* type signatures *)
  148.     cmSigCurveType*                = LONG("curv");
  149.     cmSigDataType*                = LONG("data");
  150.     cmSigDateTimeType*            = LONG("dtim");
  151.     cmSigLut16Type*                = LONG("mft2");
  152.     cmSigLut8Type*                = LONG("mft1");
  153.     cmSigMeasurementType*        = LONG("meas");
  154.     cmSigNamedColorType*            = LONG("ncol");
  155.     cmSigProfileDescriptionType*    = LONG("desc");
  156.     cmSigScreeningType*            = LONG("scrn");
  157.     cmSigS15Fixed16Type*            = LONG("sf32");
  158.     cmSigSignatureType*            = LONG("sig ");
  159.     cmSigTextType*                = LONG("text");
  160.     cmSigU16Fixed16Type*            = LONG("uf32");
  161.     cmSigU1Fixed15Type*            = LONG("uf16");
  162.     cmSigUInt32Type*                = LONG("ui32");
  163.     cmSigUInt64Type*                = LONG("ui64");
  164.     cmSigUInt8Type*                = LONG("ui08");
  165.     cmSigViewingConditionsType*    = LONG("view");
  166.     cmSigXYZType*                = LONG("XYZ ");
  167.  
  168. (* Measurement type encodings *)
  169. (* Measurement Flare *)
  170.     cmFlare0*                    = $00000000;
  171.     cmFlare100*                    = $00000001;
  172.  
  173. (* Measurement Geometry    *)
  174.     cmGeometryUnknown*            = $00000000;
  175.     cmGeometry045or450*            = $00000001;
  176.     cmGeometry0dord0*            = $00000002;
  177.  
  178. (* Standard Observer    *)
  179.     cmStdobsUnknown*                = $00000000;
  180.     cmStdobs1931TwoDegrees*        = $00000001;
  181.     cmStdobs1964TenDegrees*        = $00000002;
  182.  
  183. (* Standard Illuminant *)
  184.     cmIlluminantUnknown*            = $00000000;
  185.     cmIlluminantD50*                = $00000001;
  186.     cmIlluminantD65*                = $00000002;
  187.     cmIlluminantD93*                = $00000003;
  188.     cmIlluminantF2*                = $00000004;
  189.     cmIlluminantD55*                = $00000005;
  190.     cmIlluminantA*                = $00000006;
  191.     cmIlluminantEquiPower*        = $00000007;
  192.     cmIlluminantF8*                = $00000008;
  193.  
  194. (* Spot Function Value *)
  195.     cmSpotFunctionUnknown*        = 0;
  196.     cmSpotFunctionDefault*        = 1;
  197.     cmSpotFunctionRound*            = 2;
  198.     cmSpotFunctionDiamond*        = 3;
  199.     cmSpotFunctionEllipse*        = 4;
  200.     cmSpotFunctionLine*            = 5;
  201.     cmSpotFunctionSquare*        = 6;
  202.     cmSpotFunctionCross*            = 7;
  203.  
  204. (* Color Space Signatures *)
  205.     cmXYZData*                    = LONG("XYZ ");
  206.     cmLabData*                    = LONG("Lab ");
  207.     cmLuvData*                    = LONG("Luv ");
  208.     cmYxyData*                    = LONG("Yxy ");
  209.     cmRGBData*                    = LONG("RGB ");
  210.     cmGrayData*                    = LONG("GRAY");
  211.     cmHSVData*                    = LONG("HSV ");
  212.     cmHLSData*                    = LONG("HLS ");
  213.     cmCMYKData*                    = LONG("CMYK");
  214.     cmCMYData*                    = LONG("CMY ");
  215.     cmMCH5Data*                    = LONG("MCH5");
  216.     cmMCH6Data*                    = LONG("MCH6");
  217.     cmMCH7Data*                    = LONG("MCH7");
  218.     cmMCH8Data*                    = LONG("MCH8");
  219.  
  220. (* profileClass enumerations *)
  221.     cmInputClass*                = LONG("scnr");
  222.     cmDisplayClass*                = LONG("mntr");
  223.     cmOutputClass*                = LONG("prtr");
  224.     cmLinkClass*                    = LONG("link");
  225.     cmAbstractClass*                = LONG("abst");
  226.     cmColorSpaceClass*            = LONG("spac");
  227.  
  228. (* platform enumerations *)
  229.     cmMacintosh*                    = LONG("APPL");
  230.     cmMicrosoft*                    = LONG("MSFT");
  231.     cmSolaris*                    = LONG("SUNW");
  232.     cmSiliconGraphics*            = LONG("SGI ");
  233.     cmTaligent*                    = LONG("TGNT");
  234.  
  235. (* ColorSync 1.0 elements *)
  236.     cmCS1ChromTag*                = LONG("chrm");
  237.     cmCS1TRCTag*                    = LONG("trc ");
  238.     cmCS1NameTag*                = LONG("name");
  239.     cmCS1CustTag*                = LONG("cust");
  240.  
  241. (* General element data types *)
  242.  
  243. TYPE
  244.     CMDateTime* = RECORD
  245.         year*:                    INTEGER;
  246.         month*:                    INTEGER;
  247.         dayOfTheMonth*:            INTEGER;
  248.         hours*:                    INTEGER;
  249.         minutes*:                INTEGER;
  250.         seconds*:                INTEGER;
  251.     END;
  252.  
  253.     CMFixedXYZColor* = RECORD
  254.         X*:                        Types.Fixed;
  255.         Y*:                        Types.Fixed;
  256.         Z*:                        Types.Fixed;
  257.     END;
  258.  
  259.     CMXYZComponent* = INTEGER;
  260.  
  261.     CMXYZColor* = RECORD
  262.         X*:                        CMXYZComponent;
  263.         Y*:                        CMXYZComponent;
  264.         Z*:                        CMXYZComponent;
  265.     END;
  266.  
  267.     CM2Header* = RECORD
  268.         size*:                    LONGINT;                                (* This is the total size of the Profile *)
  269.         CMMType*:                Types.OSType;                                    (* CMM signature,  Registered with CS2 consortium  *)
  270.         profileVersion*:            LONGINT;                                (* Version of CMProfile format *)
  271.         profileClass*:            Types.OSType;                                    (* input, display, output, devicelink, abstract, or color conversion profile type *)
  272.         dataColorSpace*:            Types.OSType;                                    (* color space of data *)
  273.         profileConnectionSpace*:    Types.OSType;                                    (* profile connection color space *)
  274.         dateTime*:                CMDateTime;                                (* date and time of profile creation *)
  275.         CS2profileSignature*:    Types.OSType;                                    (* LONG("acsp") constant ColorSync 2.0 file AIFF.ID *)
  276.         platform*:                Types.OSType;                                    (* primary profile platform, Registered with CS2 consortium *)
  277.         flags*:                    LONGINT;                                (* profile flags *)
  278.         deviceManufacturer*:        Types.OSType;                                    (* Registered with CS2 consortium *)
  279.         deviceModel*:            LONGINT;                                (* Registered with CS2 consortium *)
  280.         deviceAttributes*:        ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF LONGINT;                (* Attributes like paper type *)
  281.         renderingIntent*:        LONGINT;                                (* preferred rendering intent of tagged object *)
  282.         white*:                    CMFixedXYZColor;                        (* profile illuminant *)
  283.         reserved*:                ARRAY 48 (*ΔΔ[0..47]ΔΔ*) OF CHAR;                    (* reserved for future use *)
  284.     END;
  285.  
  286.     CMTagRecord* = RECORD
  287.         tag*:                    Types.OSType;                                    (* Registered with CS2 consortium *)
  288.         elementOffset*:            LONGINT;                                (* Relative to start of CMProfile *)
  289.         elementSize*:            LONGINT;
  290.     END;
  291.  
  292.     CMTagElemTable* = RECORD
  293.         count*:                    LONGINT;
  294.         tagList*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CMTagRecord;            (* Variable size *)
  295.     END;
  296.  
  297. (* External 0x02002001 CMProfile *)
  298.     CM2Profile* = RECORD
  299.         header*:                    CM2Header;
  300.         tagTable*:                CMTagElemTable;
  301.         elemData*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR;                    (* Tagged element storage. Variable size *)
  302.     END;
  303.  
  304.     CM2ProfilePtr* = POINTER TO CM2Profile;
  305.     CM2ProfileHandle* = HANDLE TO CM2Profile (*ΔΔ POINTER TO CM2ProfilePtr*);
  306.  
  307. (* Tag Type Definitions *)
  308.     CMCurveType* = RECORD
  309.         typeDescriptor*:            Types.OSType;                                    (* LONG("curv") *)
  310.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  311.         countValue*:                LONGINT;                                (* number of entries in table that follows *)
  312.         data*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* Tagged element storage. Variable size *)
  313.     END;
  314.  
  315.     CMDataType* = RECORD
  316.         typeDescriptor*:            Types.OSType;                                    (* LONG("data") *)
  317.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  318.         dataFlag*:                LONGINT;                                (* 0* = ASCII, 1* = binary *)
  319.         data*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR;                    (* Tagged element storage. Variable size *)
  320.     END;
  321.  
  322.     CMDateTimeType* = RECORD
  323.         typeDescriptor*:            Types.OSType;                                    (* LONG("dtim") *)
  324.         reserved*:                LONGINT;
  325.         dateTime*:                CMDateTime;
  326.     END;
  327.  
  328.     CMLut16Type* = RECORD
  329.         typeDescriptor*:            Types.OSType;                                    (* LONG("mft2") *)
  330.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  331.         inputChannels*:            Types.SInt8; (* unsigned char *)                (* Number of input channels *)
  332.         outputChannels*:            Types.SInt8; (* unsigned char *)                (* Number of output channels *)
  333.         gridPoints*:                Types.SInt8; (* unsigned char *)                (* Number of clutTable grid points *)
  334.         reserved2*:                Types.SInt8; (* unsigned char *)                (* fill with 0x00 *)
  335.         matrix*:                    ARRAY 3,3 (*ΔΔ[0..2,0..2]ΔΔ*) OF Types.Fixed;                (* *)
  336.         inputTableEntries*:        INTEGER;                                (* *)
  337.         outputTableEntries*:        INTEGER;                                (* *)
  338.         inputTable*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* Variable size *)
  339.         CLUT*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* Variable size *)
  340.         outputTable*:            ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* Variable size *)
  341.     END;
  342.  
  343.     CMLut8Type* = RECORD
  344.         typeDescriptor*:            Types.OSType;                                    (* LONG("mft1") *)
  345.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  346.         inputChannels*:            Types.SInt8; (* unsigned char *)                (* *)
  347.         outputChannels*:            Types.SInt8; (* unsigned char *)                (* *)
  348.         gridPoints*:                Types.SInt8; (* unsigned char *)                (* *)
  349.         reserved2*:                Types.SInt8; (* unsigned char *)                (* fill with 0x00 *)
  350.         matrix*:                    ARRAY 3,3 (*ΔΔ[0..2,0..2]ΔΔ*) OF Types.Fixed;                (* *)
  351.         inputTable*:                ARRAY 256 (*ΔΔ[0..255]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* fixed size of 256 *)
  352.         CLUT*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  353.         outputTable*:            ARRAY 256 (*ΔΔ[0..255]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* fixed size of 256 *)
  354.     END;
  355.  
  356.     CMMeasurementType* = RECORD
  357.         typeDescriptor*:            Types.OSType;                                    (* LONG("meas") *)
  358.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  359.         standardObserver*:        LONGINT;                                (* 0 : unknown, 1 : CIE 1931, 2 : CIE 1964 *)
  360.         backingXYZ*:                CMFixedXYZColor;                        (* absolute XYZ values of backing *)
  361.         geometry*:                LONGINT;                                (* 0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 *)
  362.         flare*:                    LONGINT;                                (* 0 : 0 , 1 : 100  flare *)
  363.         illuminant*:                LONGINT;                                (* standard illuminant *)
  364.     END;
  365.  
  366.     CMNamedColorType* = RECORD
  367.         typeDescriptor*:            Types.OSType;                                    (* LONG("ncol") *)
  368.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  369.         vendorFlag*:                LONGINT;                                (* *)
  370.         count*:                    LONGINT;                                (* count of named colors in array that follows *)
  371.         prefixName*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size, max* = 32, to access fields after this one, have to count bytes *)
  372.         suffixName*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size, max* = 32 *)
  373.         colorName*:            RECORD
  374.                 rootName*:                        ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size, max* = 32 *)
  375.                 colorCoords*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size  *)
  376.             END;
  377.  
  378.                                                         (* Variable size  *)
  379.     END;
  380.  
  381.     CMTextDescriptionType* = RECORD
  382.         typeDescriptor*:            Types.OSType;                                    (* LONG("desc") *)
  383.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  384.         ASCIICount*:                LONGINT;                                (* the count of "bytes" *)
  385.         ASCIIName*:                ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size, to access fields after this one, have to count bytes *)
  386.         UniCodeCode*:            LONGINT;
  387.         UniCodeCount*:            LONGINT;                                (* the count of characters, each character has two bytes *)
  388.         UniCodeName*:            ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  389.         ScriptCodeCode*:            INTEGER;
  390.         ScriptCodeCount*:        Types.SInt8; (* unsigned char *)                (* the count of "bytes" *)
  391.         ScriptCodeName*:            ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  392.     END;
  393.  
  394.     CMTextType* = RECORD
  395.         typeDescriptor*:            Types.OSType;                                    (* LONG("text") *)
  396.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  397.         text*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* count of text is obtained from tag size element *)
  398.     END;
  399.  
  400.     CMScreeningType* = RECORD
  401.         typeDescriptor*:            Types.OSType;                                    (* LONG("scrn") *)
  402.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  403.         screeningFlag*:            LONGINT;                                (* bit 0 : use printer default screens, bit 1 : inch/cm *)
  404.         channelCount*:            LONGINT;
  405.         channelScreening*:            RECORD
  406.                 frequency*:                        Types.Fixed;
  407.                 angle*:                            Types.Fixed;
  408.                 sportFunction*:                    LONGINT;
  409.             END;
  410.  
  411.                                                 (* Variable size *)
  412.     END;
  413.  
  414.     CMSignatureType* = RECORD
  415.         typeDescriptor*:            Types.OSType;                                    (* LONG("sig ") *)
  416.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  417.         signature*:                Types.OSType;
  418.     END;
  419.  
  420.     CMS15Fixed16ArrayType* = RECORD
  421.         typeDescriptor*:            Types.OSType;                                    (* LONG("sf32") *)
  422.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  423.         value*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.Fixed;                    (* Variable size *)
  424.     END;
  425.  
  426.     CMU16Fixed16ArrayType* = RECORD
  427.         typeDescriptor*:            Types.OSType;                                    (* LONG("uf32") *)
  428.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  429.         value*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF LONGINT;                (* Variable size *)
  430.     END;
  431.  
  432.     CMUInt16ArrayType* = RECORD
  433.         typeDescriptor*:            Types.OSType;                                    (* LONG("ui16") *)
  434.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  435.         value*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* Variable size *)
  436.     END;
  437.  
  438.     CMUInt32ArrayType* = RECORD
  439.         typeDescriptor*:            Types.OSType;                                    (* LONG("ui32") *)
  440.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  441.         value*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF LONGINT;                (* Variable size *)
  442.     END;
  443.  
  444.     CMUInt64ArrayType* = RECORD
  445.         typeDescriptor*:            Types.OSType;                                    (* LONG("ui64") *)
  446.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  447.         value*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF LONGINT;                (* Variable size (x2) *)
  448.     END;
  449.  
  450.     CMUInt8ArrayType* = RECORD
  451.         typeDescriptor*:            Types.OSType;                                    (* LONG("ui08") *)
  452.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  453.         value*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  454.     END;
  455.  
  456.     CMViewingConditionsType* = RECORD
  457.         typeDescriptor*:            Types.OSType;                                    (* LONG("view") *)
  458.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  459.         illuminant*:                CMFixedXYZColor;                        (* absolute XYZs of illuminant  in cd/mPOINTER TO 2 *)
  460.         surround*:                CMFixedXYZColor;                        (* absolute XYZs of surround in cd/mPOINTER TO 2 *)
  461.         stdIlluminant*:            LONGINT;                                (* see definitions of std illuminants *)
  462.     END;
  463.  
  464.     CMXYZType* = RECORD
  465.         typeDescriptor*:            Types.OSType;                                    (* LONG("XYZ ") *)
  466.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  467.         XYZ*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CMFixedXYZColor;        (* variable size XYZ tristimulus values *)
  468.     END;
  469.  
  470. (* Profile sequence description type *)
  471.     CMProfileSequenceDescType* = RECORD
  472.         typeDescriptor*:            Types.OSType;                                    (* 'pseq ' *)
  473.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  474.         count*:                    LONGINT;                                (* Number of descriptions
  475.                                                          * variable size fields to follow, to access them, must count bytes *)
  476.         profileDescription*:            RECORD
  477.                 deviceMfg*:                        Types.OSType;                            (* Device Manufacturer *)
  478.                 deviceModel*:                    Types.OSType;                            (* Decvice Model *)
  479.                 attributes*:                        ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF LONGINT;        (* Device attributes *)
  480.                 technology*:                        Types.OSType;                            (* Technology signature *)
  481.                 mfgDescASCIICount*:                LONGINT;                        (* the count of "bytes" *)
  482.                 mfgDescASCIIName*:                ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  483.                 mfgDescUniCodeCode*:                LONGINT;
  484.                 mfgDescUniCodeCount*:            LONGINT;                        (* the count of characters, each character has two bytes *)
  485.                 mfgDescUniCodeName*:                ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  486.                 mfgDescScriptCodeCode*:            LONGINT;
  487.                 mfgDescScriptCodeCount*:            LONGINT;                        (* the count of "bytes" *)
  488.                 mfgDescScriptCodeName*:            ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  489.                 modelDescASCIICount*:            LONGINT;                        (* the count of "bytes" *)
  490.                 modelDescASCIIName*:                ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  491.                 modelDescUniCodeCode*:            LONGINT;
  492.                 modelDescUniCodeCount*:            LONGINT;                        (* the count of characters, each character has two bytes *)
  493.                 modelDescUniCodeName*:            ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  494.                 modelDescScriptCodeCode*:        INTEGER;
  495.                 modelDescScriptCodeCount*:        Types.SInt8; (* unsigned char *)        (* the count of "bytes" *)
  496.                 modelDescScriptCodeName*:        ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* Variable size *)
  497.             END;
  498.  
  499.  
  500.     END;
  501.  
  502. (* Under color removal, black generation type *)
  503.     CMUcrBgType* = RECORD
  504.         typeDescriptor*:            Types.OSType;                                    (* 'bfd  ' *)
  505.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  506.         ucrCount*:                LONGINT;                                (* Number of UCR entries *)
  507.         ucrValues*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* variable size *)
  508.         bgCount*:                LONGINT;                                (* Number of BG entries *)
  509.         bgValues*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* variable size *)
  510.         ucrbgASCII*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* null terminated ASCII string *)
  511.     END;
  512.  
  513.     CMIntentCRDVMSize* = RECORD
  514.         renderingIntent*:        LONGINT;                                (* rendering intent *)
  515.         VMSize*:                    LONGINT;                                (* VM size taken up by the CRD *)
  516.     END;
  517.  
  518.     CMPS2CRDVMSizeType* = RECORD
  519.         typeDescriptor*:            Types.OSType;                                    (* LONG("psvm") *)
  520.         reserved*:                LONGINT;                                (* fill with 0x00 *)
  521.         count*:                    LONGINT;                                (* number of intent entries *)
  522.         intentCRD*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CMIntentCRDVMSize;        (* variable size *)
  523.     END;
  524.  
  525. (************************************************************************)
  526. (*************** ColorSync 1.0 profile specification ********************)
  527. (************************************************************************)
  528.  
  529. CONST
  530.     cmGrayResponse*                = 0;
  531.     cmRedResponse*                = 1;
  532.     cmGreenResponse*                = 2;
  533.     cmBlueResponse*                = 3;
  534.     cmCyanResponse*                = 4;
  535.     cmMagentaResponse*            = 5;
  536.     cmYellowResponse*            = 6;
  537.     cmUcrResponse*                = 7;
  538.     cmBgResponse*                = 8;
  539.     cmOnePlusLastResponse*        = 9;
  540.  
  541. (* Device types *)
  542.     cmMonitorDevice*                = LONG("mntr");
  543.     cmScannerDevice*                = LONG("scnr");
  544.     cmPrinterDevice*                = LONG("prtr");
  545.  
  546.  
  547. TYPE
  548.     CMIString* = RECORD
  549.         theScript*:                Types.ScriptCode;
  550.         theString*:                Types.Str63;
  551.     END;
  552.  
  553. (* Profile options *)
  554.  
  555. CONST
  556.     cmPerceptualMatch*            = $0000;                        (* Default. For photographic images *)
  557.     cmColorimetricMatch*            = $0001;                        (* Exact matching when possible *)
  558.     cmSaturationMatch*            = $0002;                        (* For solid colors *)
  559.  
  560. (* Profile flags *)
  561.     cmNativeMatchingPreferred*    = $00000001;                    (* Default to native not preferred *)
  562.     cmTurnOffCache*                = $00000002;                    (* Default to turn on CMM cache *)
  563.  
  564.     
  565. TYPE
  566.     CMMatchOption* = LONGINT;
  567.  
  568.     CMMatchFlag* = LONGINT;
  569.  
  570.     CMHeader* = RECORD
  571.         size*:                    LONGINT;
  572.         CMMType*:                Types.OSType;
  573.         applProfileVersion*:        LONGINT;
  574.         dataType*:                Types.OSType;
  575.         deviceType*:                Types.OSType;
  576.         deviceManufacturer*:        Types.OSType;
  577.         deviceModel*:            LONGINT;
  578.         deviceAttributes*:        ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF LONGINT;
  579.         profileNameOffset*:        LONGINT;
  580.         customDataOffset*:        LONGINT;
  581.         flags*:                    CMMatchFlag;
  582.         options*:                CMMatchOption;
  583.         white*:                    CMXYZColor;
  584.         black*:                    CMXYZColor;
  585.     END;
  586.  
  587.     CMProfileChromaticities* = RECORD
  588.         red*:                    CMXYZColor;
  589.         green*:                    CMXYZColor;
  590.         blue*:                    CMXYZColor;
  591.         cyan*:                    CMXYZColor;
  592.         magenta*:                CMXYZColor;
  593.         yellow*:                    CMXYZColor;
  594.     END;
  595.  
  596.     CMProfileResponse* = RECORD
  597.         counts*:                    ARRAY (*ΔΔ[0..*)cmOnePlusLastResponse(*ΔΔ -1]ΔΔ*) OF INTEGER;
  598.         data*:                    ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF INTEGER;                (* Variable size *)
  599.     END;
  600.  
  601.     CMProfile* = RECORD
  602.         header*:                    CMHeader;
  603.         profile*:                CMProfileChromaticities;
  604.         response*:                CMProfileResponse;
  605.         profileName*:            CMIString;
  606.         customData*:                ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR;                    (* Variable size *)
  607.     END;
  608.  
  609.     CMProfilePtr* = POINTER TO CMProfile;
  610.     CMProfileHandle* = HANDLE TO CMProfile (*ΔΔ POINTER TO CMProfilePtr*);
  611.  
  612. (*$IF OLDROUTINENAMES *)
  613.  
  614. CONST
  615.     kCMApplProfileVersion*        = cmCS1ProfileVersion;
  616.  
  617.     grayResponse*                = cmGrayResponse;
  618.     redResponse*                    = cmRedResponse;
  619.     greenResponse*                = cmGreenResponse;
  620.     blueResponse*                = cmBlueResponse;
  621.     cyanResponse*                = cmCyanResponse;
  622.     magentaResponse*                = cmMagentaResponse;
  623.     yellowResponse*                = cmYellowResponse;
  624.     ucrResponse*                    = cmUcrResponse;
  625.     bgResponse*                    = cmBgResponse;
  626.     onePlusLastResponse*            = cmOnePlusLastResponse;
  627.  
  628.     rgbData*                        = cmRGBData;
  629.     cmykData*                    = cmCMYKData;
  630.     grayData*                    = cmGrayData;
  631.     xyzData*                        = cmXYZData;
  632.  
  633.     monitorDevice*                = cmMonitorDevice;
  634.     scannerDevice*                = cmScannerDevice;
  635.     printerDevice*                = cmPrinterDevice;
  636.  
  637.     
  638. TYPE
  639.     XYZComponent* = INTEGER;
  640.  
  641.     XYZColor* = CMXYZColor;
  642.  
  643.     CMResponseData* = INTEGER;
  644.  
  645.     IString* = CMIString;
  646.  
  647.     CMResponseColor* = LONGINT;
  648.  
  649.     responseColor* = CMResponseColor;
  650.  
  651. (*$END*)
  652.  
  653. (* $ALIGN RESET*)
  654. (* $POP*)
  655.  
  656.  END CMICCProfile.
  657.